package days48;

import java.util.Scanner;

public class day29 {
    public static void main1(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        while (n>0){
            System.out.println(find_code(n));
        }
    }
    private static int find_code(int n) {
        if(n==1){
            return 0;
        }
        if(n<=3){
            return 1;
        }
        int a,b,count;
        a=(n+2)/3;
        b=n-a*2;
        count=1+find_code(Math.max(a,b));
        return count;
    }
    static int a=0;
    public static void main2() throws InterruptedException {
        Thread t1=new Thread(()->{
            for (int i = 0; i < 10000; i++) {
                a++;
            }
        });
        Thread t2=new Thread(()->{
            for (int i = 0; i < 10000; i++) {
                a++;
            }
        });
            t1.start();
            t2.start();
            t1.join();
            t2.join();
            System.out.println(a);
    }

    public static void main(String[] args) throws InterruptedException {
        for (int i = 0; i < 10; i++) {
            main2();
        }
    }
}
